<template>
    <h4>vue路由地址查询参数</h4>
    <input type="button" value="printQuery" @click="printQuery()">
    <p>$route.query:{{ $route.query }}</p>
    <p>$route.query.username:{{ $route.query.username }}</p>
    <p>$route.query.password:{{ $route.query.password }}</p>
</template>

<script>
    export default {
        methods: {
            printQuery() {
                console.log("this.$route.query:",this.$route.query); 
                console.log("this.$route.query.username:",this.$route.query.username); 
                console.log("this.$route.query.password:",this.$route.query.password); 
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>